//
//  MoodDialogView.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/2/14.
//

import SwiftUI
//功能弹窗
struct HomeFunctionDialogView: View {
    let onDismiss: () -> Void
    
    var body: some View {
        PopupBottomView(title: "请选择功能") {
            HStack(spacing: 0){
                VStack{
                    HStack{
                        Image(.homeIconMail)
                            .resizable()
                            .padding(4)
                    }.frame(width: 50, height: 50)
                        .background(themeManager.themeColor)
                        .clipShape(Circle())
                    
                    Text("每周来信")
                        .font(.system(size: 14))
                        .foregroundStyle(.bgNormalText)
                }.contentShape(Rectangle())
                    .onTapGesture {
                        pathManager.jump(type: JumpType.WEEKLY_LETTER)
                        onDismiss()
                    }
                Spacer()
                VStack{
                    HStack{
                        Image(.homeIconCall)
                            .resizable()
                            .padding(4)
                    }.frame(width: 50, height: 50)
                        .background(themeManager.themeColor)
                        .clipShape(Circle())
                    Text("来电")
                        .font(.system(size: 14))
                        .foregroundStyle(.bgNormalText)
                }.contentShape(Rectangle())
                    .onTapGesture {
                        pathManager.jump(type: JumpType.CALL_HISTORY)
                        onDismiss()
                    }
                Spacer()
//                VStack{
//                    HStack{
//                        Image(.homeIconSearch)
//                            .resizable()
//                            .padding(10)
//                    }.frame(width: 50, height: 50)
//                        .background(themeManager.themeColor)
//                        .clipShape(Circle())
//                    Text("搜索")
//                        .font(.system(size: 14))
//                        .foregroundStyle(.bgNormalText)
//                }.contentShape(Rectangle())
//                    .onTapGesture {
//                        onDismiss()
//                    }
//                Spacer()
                VStack{
                    HStack{
                        Image(.homeIconChat2)
                            .resizable()
                            .padding(7)
                    }.frame(width: 50, height: 50)
                        .background(themeManager.themeColor)
                        .clipShape(Circle())
                    Text("心灵")
                        .font(.system(size: 14))
                        .foregroundStyle(.bgNormalText)
                }.contentShape(Rectangle())
                    .onTapGesture {
                        pathManager.jump(type: JumpType.AI_SET_VIEW)
                        onDismiss()
                    }
            }.frame(maxWidth: .infinity)
                .padding(.vertical,30)
        }
    }
}

#Preview {
    HomeFunctionDialogView(){}
}
